﻿@model DotaHelp.Models.Topic

<div class="commentAutor">
@if (!Model.IsNews) { <text>Сообщение </text> } else {<text>Новость</text>}
№@Model.Id 
@Html.ShowUserName(Model.Author) @Model.Date  
<img src="@Url.Content("~/Content/star.jpg")"  />
<span style="color:Black; font-weight:bold;">@Model.Raiting</span> 
@Html.RouteLink("(обсудить)", "Topic", new { id = Model.Id }, new { style = "margin-left:5px" })
@Html.Delete("Forum", Model.Id)
</div>
     


@if (Model.IsNews)
{ 
    <h5>@Html.ReplaceKeyOnContent(Model.Caption, true, true)</h5>
    
    <div>
        @Html.ReplaceKeyOnContent(Model.Text, true, true) @Html.EditDialog("Topics", "Text", Model.Id, Model.Text)
    </div>  
    <div style="margin-left:20px">    
        @Html.CompactComments(Url.RouteUrl("Topic", new { id = Model.Id }))          
    </div>  
}
else
{ 
    <div>@Html.ReplaceKeyOnContent(Model.Caption, true, true)</div>
}